package string;
/*

        == : 比较字符串是否相等
            基本数据类 ; 一定比的是数值
            引用数据类型;一定比的是地址值
 */

public class StringTest {
    public static void main(String[] args) {
    String str1 = "hello";
    String str2 = "hello";

    String str3 = new String("hello");
    String str4 = new String("hello");

    char[] chs = {'H','e','l','l','o'};
    String str5 = new String(chs);

        System.out.println(str1 == str2);//1
        System.out.println(str3 == str4);//0
        System.out.println(str1 == str3);//0
        System.out.println(str1 == str5);//0
        System.out.println(str3 == str5);//0

    }
}
